import { lazy } from "react";

const routers=[
    {
        path:"/",
        to:"/home"
    },
    {
        path:'/home',
        component:lazy(()=>import("../views/home/Index")),
        children :[
            {
                path:'/home/homeindex',
                component:lazy(()=>import("../views/home/homeindex/HomeIndex")),
            },
            {
                path:'/home/classify',
                component:lazy(()=>import("../views/home/classify/Classify")),
            },
            {
                path:'/home/shop',
                component:lazy(()=>import("../views/home/shop/Shop")),
            },
            {
                path:'/home/my',
                component:lazy(()=>import("../views/home/my/My")),
            },{
                path:"/home",
                to:"/home/homeindex"
            }
        ]
    },
    {
        path:'/login',
        component:lazy(()=>import("../views/login/Login"))
    },
    {
        path:'*',
        component:lazy(()=>import("../views/404/P404"))
    },
]

export default routers